{namespace vh=In2code\Powermail\ViewHelpers}

<div id="powermail_fieldwrap_{field.uid}" class="powermail_fieldwrap powermail_fieldwrap_check powermail_fieldwrap_{field.uid} {field.css}">
	<fieldset>
		<legend class="powermail_label powermail_check_legend" title="{field.description}">
			<vh:string.RawAndRemoveXss>{field.title}</vh:string.RawAndRemoveXss><f:if condition="{field.mandatory}"><span class="mandatory">*</span></f:if>
		</legend>

		<div class="powermail_check_outer {vh:Validation.ErrorClass(field:field, class:'powermail_field_error')}">
			<f:for each="{field.modifiedSettings}" as="setting" iteration="index">
				<div class="powermail_check_inner powermail_check_inner_{index.cycle}">
					<f:form.checkbox
							property="{field.marker}."
							value="{setting.value}"
							checked="{vh:Misc.PrefillMultiField(field:field, mail:mail, cycle:index.cycle)}"
							id="powermail_field_{field.marker}_{index.cycle}"
							additionalAttributes="{vh:Validation.ValidationDataAttribute(field:field, iteration:index)}"
							class="powermail_checkbox powermail_checkbox_{field.uid}" />

					<label for="powermail_field_{field.marker}_{index.cycle}">
						<vh:string.RawAndRemoveXss>{setting.label}</vh:string.RawAndRemoveXss>
					</label>
				</div>
			</f:for>

			<f:if condition="{settings.validation.client}">
				<div class="powermail_field_error_container powermail_field_error_container_{field.marker}"></div>
			</f:if>
		</div>
	</fieldset>
</div>
